<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<LINK REL="shortcut icon" HREF="http://mqbook.googlecode.com/svn/trunk/favicon.ico"/>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="cache-control" content="" />
<meta name="viewport" content="target-densitydpi=high-dpi, width=device-width", user-scalable=no" />
<link href="" media="handheld, screen" rel="stylesheet" type="text/css" />
<title>MMI QuickBook</title>
</head>
<FORM NAME="book" ACTION="" METHOD="GET">
<INPUT TYPE="hidden" NAME="conf" id="src" >
</FORM>
<body>
<h2 align = "center"> <strong>MMI QuickBook</strong> </h2>
<div id="" align ="center">
		<div class="">
<script language="javascript">
var locate = window.location
document.book.conf.value = locate

var text = document.book.conf.value

var zork = delineate(text)
document.book.conf.value = zork

var a = new Date();
var b =(a.getUTCFullYear());

var c = new Date();
var d =PadDigits((c.getUTCMonth()+01),2);

var e = new Date();
var f = PadDigits((e.getUTCDate()+00),2);

var g = new Date();
var h = PadDigits((g.getUTCHours()),2);

var i = new Date();
var j = PadDigits((i.getUTCHours())+1,2);

//document.write(b+''+d+f+"T"+h+"0000"+"Z"+"/"+b+''+d+f+"T"+j+"0000"+"Z");

function PadDigits(n, totalDigits) 
{ 
    n = n.toString(); 
    var pd = ''; 
    if (totalDigits > n.length) 
    { 
        for (i=0; i < (totalDigits-n.length); i++) 
        { 
            pd += '0'; 
        } 
    } 
    return pd + n.toString(); 
} 

function delineate(str)
{
theleft = str.indexOf("=") + 1;
theright = str.lastIndexOf("&");
return(str.substring(theleft, theright));
}

document.write("<iframe src='http://calendar.google.com/a/motorola.com/embed?mode=WEEK&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;showTz=0&amp;height=400&amp;wkst=2&amp;bgcolor=%23FFFFFF&amp;src="
+ delineate(text) + "&amp;ctz=America%2FChicago' style= border-width:0 width=450 height=400 frameborder=0 scrolling=yes></iframe>");
function gosearch() { 
var room = document.getElementById('src').value;
var searchstring = document.getElementById('searchfield').value; 
var searchsite1 = "https://calendar.google.com/a/motorola.com/event?action=TEMPLATE&text=Book Now&dates=20110501T130000Z/20110501T240000Z&details=&location=&add="; 
var searchsite = "https://calendar.google.com/a/motorola.com/event?action=TEMPLATE&text=Quick%20Book&dates="; 
var end = "&details=&location=&add=";
var t = (b+''+d+f+"T"+h+"0000"+"Z"+"/"+b+''+d+f+"T"+j+"0000"+"Z")
var searchurl = searchsite + t +end+ room;
window.location.href = searchurl; 
} 
</SCRIPT>
<br>
<input type="hidden" name="searchfield" id="searchfield" value="" />

<br>
<input type="image" src ="booknow.png" name="gobutton" id="gobutton" value="" onclick="gosearch();" />
</body>
</html>